package com.wicket.okrapp.biz.service.nb;
 import com.wicket.okrapp.common.util.CommonFunctionHelper;
 import org.springframework.stereotype.Service;

import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import com.wicket.okrapp.biz.service.dto.req.CalculateCaluDateDiffReqDto;
import com.wicket.okrapp.biz.service.dto.res.CalculateCaluDateDiffRespDto;
/**
 * @author ： 手工接入方法
 * @since 2022/5/28 15:32
 *
 *
 * @version 1.0
 */
@Service
public class NbCalculationRules {
/**
      * code:caluTimeDiff
      * name:M3-计算时间相减得偏差
      * desc:undefined
      * gen by moon at 8/28/2022, 4:07:17 PM
      * 
      **/
     @Trace(operationName = "M3-计算时间相减得偏差")
     @Tags({@Tag(key = "参数",value = "arg[0]"),
     @Tag(key = "返回值",value = "returnedObj")})
      public CalculateCaluDateDiffRespDto calculateCaluDateDiff(CalculateCaluDateDiffReqDto reqDto) {
         CalculateCaluDateDiffRespDto retData = new CalculateCaluDateDiffRespDto();
        int days = CommonFunctionHelper.differentDaysByString(reqDto.getCaluEndTime(),reqDto.getCaluStartTime());
        retData.setTimeDiffDays(String.valueOf(days));
        retData.setTimeDiffHours(String.valueOf(days*24));
        return retData;
      }
    //手工接入方法
}
